﻿namespace BrainTechLLC.ThreadSafeObjects
{
    using System;

    public interface ILogListener
    {
        #region Events

        event EventHandler<SimpleEventArgs<LogMessage>> NewLogEntry;

        #endregion Events

        #region Properties

        bool IsListening
        {
            get; set;
        }

        #endregion Properties

        #region Methods

        void OnNewLogEntry(SimpleEventArgs<LogMessage> eventArgs);

        #endregion Methods
    }

    public class SimpleEventArgs<T> : EventArgs
    {
        #region Constructors

        public SimpleEventArgs(T val)
        {
            Value = val;
        }

        public SimpleEventArgs()
        {
        }

        #endregion Constructors

        #region Properties

        public T Value
        {
            get; set;
        }

        #endregion Properties
    }
}